home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 56118 / 56118.xpi / chrome / content / ffbccthis / mac / bccthis.js next >
Text File  |  2009-12-21  |  1KB  |  26 lines

  1. function ClickBccthis(event) {
  2.     if (event.button == 0) {
  3.         var d=content.document;
  4.         var w=window;
  5.         var f='http://bccth.is/bookmarklet/index.php?';
  6.         var l=d.location;
  7.         var e=encodeURIComponent;
  8.         var p='address='+e(l.href)+'&title='+e(d.title);
  9.         var u=f+p;
  10.     
  11.         var br = document.getElementById("content");
  12.         var wnd = null;
  13.         if (br == null || !br.selectedTab)
  14.             wnd = document.commandDispatcher.focusedWindow;
  15.         else
  16.             wnd = br.getBrowserForTab(br.selectedTab).docShell
  17.                                .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
  18.                                .getInterface(Components.interfaces.nsIDOMWindow);
  19.     
  20.         var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
  21.                            .getService(Components.interfaces.nsIWindowWatcher);
  22.         var win = ww.openWindow(wnd, u, null, "scrollbars=no,toolbar=no,location=no,resizable=no,status=no,width=590,height=610,chrome=yes,centerscreen,dialog=yes", null);
  23.         //w.open(u, null, "scrollbars=no,toolbar=no,location=no,resizable=no,status=no,width=590,height=610,chrome=yes,centerscreen,dialog=yes");
  24.     }
  25. }
  26.